.class Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;
.super Landroid/os/AsyncTask;
.source "CopyOfSearchActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/opongo/blogapp/activities/CopyOfSearchActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "downloadNewPostsAsyncTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;


# direct methods
.method private constructor <init>(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 108
    iput-object p1, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 108
    invoke-direct {p0, p1}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;-><init>(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)V

    return-void
.end method


# virtual methods
.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->doInBackground([Ljava/lang/Void;)Ljava/lang/Void;

    move-result-object v0

    return-object v0
.end method

.method protected varargs doInBackground([Ljava/lang/Void;)Ljava/lang/Void;
    .locals 7
    .parameter "params"

    .prologue
    .line 113
    iget-object v6, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    iget-object v0, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    #getter for: Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->apiManager:Lcom/opongo/blogapp/manager/APIManager;
    invoke-static {v0}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$0(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)Lcom/opongo/blogapp/manager/APIManager;

    move-result-object v0

    const/4 v1, 0x0

    const/4 v2, 0x1

    const/16 v3, 0x14

    .line 114
    iget-object v4, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    #getter for: Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->searchString:Ljava/lang/String;
    invoke-static {v4}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$1(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)Ljava/lang/String;

    move-result-object v4

    iget-object v5, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    #getter for: Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->cat_parent:I
    invoke-static {v5}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$2(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)I

    move-result v5

    .line 113
    invoke-virtual/range {v0 .. v5}, Lcom/opongo/blogapp/manager/APIManager;->getPosts(IIILjava/lang/String;I)Ljava/util/ArrayList;

    move-result-object v0

    #setter for: Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->posts:Ljava/util/ArrayList;
    invoke-static {v6, v0}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$3(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;Ljava/util/ArrayList;)V

    .line 115
    const/4 v0, 0x0

    return-object v0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->onPostExecute(Ljava/lang/Void;)V

    return-void
.end method

.method protected onPostExecute(Ljava/lang/Void;)V
    .locals 3
    .parameter "result"

    .prologue
    .line 120
    sget-boolean v1, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->DEBUG:Z

    if-eqz v1, :cond_0

    invoke-static {}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$4()Ljava/lang/String;

    move-result-object v1

    const-string v2, "onPostExecute"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 122
    :cond_0
    iget-object v1, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    #getter for: Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->mAdapter:Lcom/opongo/blogapp/adapter/PostCacheListAdapter;
    invoke-static {v1}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$5(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)Lcom/opongo/blogapp/adapter/PostCacheListAdapter;

    move-result-object v1

    invoke-virtual {v1}, Lcom/opongo/blogapp/adapter/PostCacheListAdapter;->clear()V

    .line 125
    :try_start_0
    iget-object v1, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    #getter for: Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->posts:Ljava/util/ArrayList;
    invoke-static {v1}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$6(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
    :try_end_0
    .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v2

    if-nez v2, :cond_1

    .line 132
    :goto_1
    iget-object v1, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    #getter for: Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->mAdapter:Lcom/opongo/blogapp/adapter/PostCacheListAdapter;
    invoke-static {v1}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$5(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)Lcom/opongo/blogapp/adapter/PostCacheListAdapter;

    move-result-object v1

    invoke-virtual {v1}, Lcom/opongo/blogapp/adapter/PostCacheListAdapter;->notifyDataSetChanged()V

    .line 133
    return-void

    .line 125
    :cond_1
    :try_start_1
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/opongo/blogapp/common/Post;

    .line 126
    .local v0, post:Lcom/opongo/blogapp/common/Post;
    iget-object v2, p0, Lcom/opongo/blogapp/activities/CopyOfSearchActivity$downloadNewPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/CopyOfSearchActivity;

    #getter for: Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->mAdapter:Lcom/opongo/blogapp/adapter/PostCacheListAdapter;
    invoke-static {v2}, Lcom/opongo/blogapp/activities/CopyOfSearchActivity;->access$5(Lcom/opongo/blogapp/activities/CopyOfSearchActivity;)Lcom/opongo/blogapp/adapter/PostCacheListAdapter;

    move-result-object v2

    invoke-virtual {v2, v0}, Lcom/opongo/blogapp/adapter/PostCacheListAdapter;->add(Ljava/lang/Object;)V
    :try_end_1
    .catch Ljava/lang/NullPointerException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 128
    .end local v0           #post:Lcom/opongo/blogapp/common/Post;
    :catch_0
    move-exception v1

    goto :goto_1
.end method
